<?php

function SuperSanitizer($field, $value)
{
	// converts various fields from their internalized fields into something
	// more human readable, but really should be in globals.php for general
	// use
	// Only used now in the Display Dealer scripts to clean up output
	// 2015: removed a few fields that haven`t been used in 2+ years

	require('globals.php');

	switch ($field) {
		//case ('Billed?'):
		//case ('Registered?'):
		case ('Dealer Assistant?'):
		case ('Table Preference?'):
		case ('Wall Space?'):
		case ('Table Adjacent To Dealer?'):
		case ('Table Away From Dealer?'):
		case ('Cancelled?'):
		//case ('Minor?'):
		case ('Issue With Application'):
		case ('Active Power?'):
		case ('No Special Requests?'):		// yes, both exist
		case ('Special Requests?'):			// and they`re the same field, just two ways :P
			if ($value)
				$output = "Yes";
			else
				$output = "No";
			break;
		case ('Table Size (Request):'):
		//case ('Table Size (Minimum):'):
		//case ('Table Size (Assigned):'):
			if ($value != -1)
				$output = $table_types[$value];
			else
				$output = "Not Yet Assigned";
			break;
		case ('Cancellation Date:'):
		//case ('Billing Date:'):
		//case ('Registration Date:'):
			if (!$value)
				$output .= "-------";
			else
				$output = $value;
			break;
		case ('Payment Method'):
			$output = $payment_methods[$value];
			break;
		case ('Tax ID'):
			if (!$value)
				$output = "Not Provided";
			else
				$output = $value;
			break;
		default:
			$output = $value;
	}
	return($output);
}

?>